home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / meltdown.lha / LAMETRO / Intro.bak next >
Encoding:
Text File  |  1988-07-19  |  5.0 KB  |  249 lines

  1. *****************************************************************************
  2. *                                                                           *
  3. *                 Second Part For Demo ( Introduction )               *
  4. *                                                                           *
  5. *  Start Date : 2/3/91                                                      *
  6. * Last Update : 2/3/91                                                      *
  7. *                                  Code : Melt Down *
  8. *                                                                           *
  9. *****************************************************************************
  10.  
  11. ; Include the macros
  12.  
  13.     Incdir    Df1:
  14.     Include    Source/Macro
  15.  
  16. *****************************************************************************
  17.  
  18. ; Dont forget to use chip ram
  19.  
  20.     Chip
  21.     
  22. *****************************************************************************
  23.  
  24. ; Kill the operating system for good mesure
  25.  
  26.     Kill        
  27.     
  28. *****************************************************************************
  29.  
  30. ; Load custom and set up copper list
  31.  
  32.     Lea    Custom,A5
  33.     Move.l    #Copper,Cop1lch(a5)
  34.     
  35. *****************************************************************************
  36.  
  37. ; Clear Some Shit
  38.  
  39.     Blitwait
  40.     Move.l    #$70000,Bltdpth(a5)
  41.     Move.l    #-1,Bltafwm(a5)
  42.     Move.w    #0,Bltdmod(a5)
  43.     Move.l    #$01000000,Bltcon0(a5)
  44.     Move.w    #256*64+60,Bltsize(a5)
  45.  
  46. *****************************************************************************
  47.  
  48.     Blitwait
  49.  
  50. *****************************************************************************
  51.  
  52.     Bsr    PrintTitle
  53.     
  54. *****************************************************************************
  55.  
  56. ; Main routine here
  57.  
  58. Mouse
  59.     Pos                    ; Get in sync with vbi
  60.     Bsr    Scroller
  61.     Tst.l    OutFlag
  62.     Bne.s    Quit
  63.     Tstmice    Mouse                ; Pressed the mouse
  64.     
  65. *****************************************************************************
  66.  
  67. ; Return operating system and go back to user
  68.  
  69. Quit
  70.     Heal
  71.     Clr.l    D0                ; No error
  72.     Rts
  73.     
  74. *****************************************************************************
  75.  
  76. Scroller
  77.     Tst.l    Scrolled
  78.     Bne.s    Scrollon
  79.     Move.l    #8,Scrolled
  80.     Moveq    #0,D0
  81.     Move.l    ScrollPtr,a0
  82.     Move.b    (a0)+,d0
  83.     Cmp.b    #-1,D0
  84.     Bne.s    NoEnd
  85.     Move.l    #Scroll,A0
  86.     Move.b    (a0)+,d0
  87.     Move.l    #-1,OutFlag
  88. NoEnd
  89.     Move.l    a0,ScrollPtr
  90.     Sub.b    #32,d0                
  91.     Divu    #20,d0                
  92.     Move.w    d0,d1                
  93.     Mulu    #40*16,d1            
  94.     Swap    d0                
  95.     Add.w    d0,d0                
  96.     Add.w    d0,d1                
  97.     Lea    Font,A2
  98.     Add.w    D1,A2
  99.     Move.l    A2,Bltapth(A5)
  100.     Move.l    #$70000+(62*42)-18,Bltdpth(A5)
  101.     Move.w    #38,Bltamod(A5)
  102.     Move.w    #40,Bltdmod(A5)
  103.     Move.l    #-1,Bltafwm(A5)
  104.     Move.l    #$09f00000,Bltcon0(a5)
  105.     Move.w    #16*64+1,Bltsize(A5)
  106. Scrollon    
  107.  
  108.     Move.l    #$70002+(62*42)-18,Bltapth(A5)
  109.     Move.l    #$70000+(62*42)-18,Bltdpth(A5)
  110.     Move.w    #0,Bltamod(A5)
  111.     Move.w    #0,Bltdmod(A5)
  112.     Move.l    #-1,Bltafwm(A5)
  113.     Move.l    #$E9f00000,Bltcon0(a5)
  114.     Move.w    #16*64+21,Bltsize(A5)
  115.     Sub.l    #1,Scrolled
  116.     Rts
  117. Scrolled
  118.     Dc.l    0
  119.             
  120. *****************************************************************************
  121.  
  122. PrintTitle
  123.     Move.l    #$09f00000,Bltcon0(a5)
  124.     Move.w    #38,Bltamod(A5)
  125.     Move.w    #38,Bltdmod(A5)
  126.     Move.l    #-1,Bltafwm(a5)
  127.     Move.l    #20-1,d7                ; Amount Of Chars
  128.     Lea    $70000+(3*40),A0            ; Dest
  129.     Lea    Title,A1                ; Text
  130.     Move.w    #16*64+1,D6
  131. Loop
  132.     Moveq    #0,D0
  133.     Moveq    #0,D1
  134.     Move.b    (a1)+,d0
  135.     Sub.b    #32,d0                
  136.     Divu    #20,d0                
  137.     Move.w    d0,d1                
  138.     Mulu    #40*16,d1            
  139.     Swap    d0                
  140.     Add.w    d0,d0                
  141.     Add.w    d0,d1                
  142.     Lea    Font,A2
  143.     Add.w    D1,A2
  144.     Move.l    A2,Bltapth(A5)
  145.     Move.l    A0,Bltdpth(A5)
  146.     Move.w    D6,Bltsize(a5)
  147.     Add.w    #2,A0
  148.     Dbf    D7,Loop
  149.     Rts
  150.     
  151. *****************************************************************************
  152.  
  153. ; All copper list after here
  154.  
  155. Copper
  156.  
  157.     Spr_Off                    ; Switch sprites off
  158.     Cmove    $2871,Diwstrt
  159.     Cmove    $2cc1,Diwstop
  160.     Cmove    $0038,Ddfstrt
  161.     Cmove    $00d0,Ddfstop
  162.     Cmove    $0000,Bpl1mod            
  163.     Cmove    $0000,Bpl2mod
  164.     Cmove    $0000,Color00
  165.     Cmove    $0fff,Color01
  166. A    Set    70
  167. B    Set    $0000
  168.     Rept    $f
  169.     Cwait    a,0
  170.     Cmove    B,Color00
  171. A    Set    a+1
  172. B    Set    B+$100
  173.     Endr
  174.     Rept    $f
  175.     Cwait    a,0
  176.     Cmove    B,Color00
  177. A    Set    a+1
  178. B    Set    B-$100    
  179.     Endr
  180.  
  181.     Cmove    $0007,Bpl1pth
  182.     Cmove    $0000,Bpl1ptl
  183.     Cmove    $1200,Bplcon0
  184.  
  185. A    Set    120
  186. B    Set    $0000
  187.     Rept    $f
  188.     Cwait    a,0
  189.     Cmove    B,Color00
  190. A    Set    a+1
  191. B    Set    B+$010
  192.     Endr
  193.     Rept    $f
  194.     Cwait    a,0
  195.     Cmove    B,Color00
  196. A    Set    a+1
  197. B    Set    B-$010    
  198.     Endr
  199.     Cmove    2,Bpl1mod
  200.     Cmove    2,Bpl2mod
  201.  
  202. A    Set    190
  203. B    Set    $0000
  204.     Rept    $f
  205.     Cwait    a,0
  206.     Cmove    B,Color00
  207. A    Set    a+1
  208. B    Set    B+$110
  209.     Endr
  210.     Rept    $f
  211.     Cwait    a,0
  212.     Cmove    B,Color00
  213. A    Set    a+1
  214. B    Set    B-$110    
  215.     Endr
  216.     Cmove    $0200,Bplcon0
  217.     Endcop
  218.  
  219. *****************************************************************************
  220.  
  221. Title
  222.     DC.B    "   ARENA PRESENTS   "
  223.     
  224. *****************************************************************************
  225.  
  226. OUTFLAG    DC.L    0
  227.  
  228. *****************************************************************************
  229.  
  230. SCROLLPTR
  231.     DC.L    SCROLL
  232. SCROLL
  233.     DC.B    " THERE FIRST DEMO"
  234.     DC.B    " CREDS FOR THIS COOL DEMO GO TO"
  235.     DC.B    " ME MELT DOWN FOR THE CODE GFX ARE BY EFFEX"
  236.     DC.B    " THE MUSIC IS BY ?????"
  237.     DC.B    " NOW THIS IS AN AMIGA LETS USE IT LIKE ONE"
  238.     DC.B    " WELL LETS COUNT DOWN TO THE REAL CODE                    "
  239.     DC.B    255
  240.      EVEN
  241.      
  242. *****************************************************************************
  243.  
  244. Font
  245.     Incbin    Gfx/16x16.bm
  246.     
  247. *****************************************************************************
  248.  
  249.